package com.ruoyi.common.core.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.core.domain.ActHiProcinstExt;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * 参数配置 数据层
 */
@Repository
public interface ActHiProcinstExtMapper extends BaseMapper<ActHiProcinstExt>
{

    @Select("select h.type_ from `act_hi_comment` h where h.`PROC_INST_ID_` = #{processInstanceId} order by TIME_ desc limit 1")
    String getFlowStatus(@Param("processInstanceId") String processInstanceId);

    @Select("select * from `act_hi_procinst_ext` h where h.`PROC_INST_ID` = #{procInstId} limit 1")
    ActHiProcinstExt findByProcInstId(@Param("procInstId") String procInstId);
}
